package com.daedalus.Polimorfizmi.InterfaceAbstractShape;

public class Cube extends ThreeDimensionalShape{

	public Cube(double dim) {
		super(dim);
	}

	@Override
	public double getArea() {
		return Math.pow(getDimension(),2)*6;
	}

	@Override
	public double getVolume() {
		return Math.pow(getDimension(), 3);
	}

	public String toString(){
		return String.format("Object : Cube  \n Brinja: %.2f",getDimension());
	}
}
